3.348 \(\int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{\sqrt {a+b \tan (c+d x)}} \, dx\)

Optimal. Leaf size=169 \[ \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {(B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d \sqrt {a-i b}}-\frac {(-B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d} \]

[Out]

(A*b-2*B*a)*arctanh((a+b*tan(d*x+c))^(1/2)/a^(1/2))/a^(3/2)/d+(I*A+B)*arctanh((a+b*tan(d*x+c))^(1/2)/(a-I*b)^(
1/2))/d/(a-I*b)^(1/2)-(I*A-B)*arctanh((a+b*tan(d*x+c))^(1/2)/(a+I*b)^(1/2))/d/(a+I*b)^(1/2)-A*cot(d*x+c)*(a+b*
tan(d*x+c))^(1/2)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.51, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3609, 3653, 3539, 3537, 63, 208, 3634} \[ \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {(B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d \sqrt {a-i b}}-\frac {(-B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d} \]

Antiderivative was successfully verified.

[In]

Int[(Cot[c + d*x]^2*(A + B*Tan[c + d*x]))/Sqrt[a + b*Tan[c + d*x]],x]

[Out]

((A*b - 2*a*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]])/(a^(3/2)*d) + ((I*A + B)*ArcTanh[Sqrt[a + b*Tan[c +
d*x]]/Sqrt[a - I*b]])/(Sqrt[a - I*b]*d) - ((I*A - B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]])/(Sqrt[a
+ I*b]*d) - (A*Cot[c + d*x]*Sqrt[a + b*Tan[c + d*x]])/(a*d)

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3537

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c*
d)/f, Subst[Int[(a + (b*x)/d)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3539

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3609

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(A*b - a*B)*(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n
 + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 + b^2)), x] + Dist[1/((m + 1)*(b*c - a*d)*(a^2 + b^2)), Int[(a + b*Tan[e +
f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*B*(b*c*(m + 1) + a*d*(n + 1)) + A*(a*(b*c - a*d)*(m + 1) - b^2*d*(
m + n + 2)) - (A*b - a*B)*(b*c - a*d)*(m + 1)*Tan[e + f*x] - b*d*(A*b - a*B)*(m + n + 2)*Tan[e + f*x]^2, x], x
], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
&& LtQ[m, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n]) &&  !(ILtQ[n, -1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ
[a, 0])))

Rule 3634

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_) + (C_.)*
tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[A/f, Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x]
 /; FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]

Rule 3653

Int[(((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2))/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/(a^2 + b^2), Int[(c + d*Tan[e + f*
x])^n*Simp[b*B + a*(A - C) + (a*B - b*(A - C))*Tan[e + f*x], x], x], x] + Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 +
b^2), Int[((c + d*Tan[e + f*x])^n*(1 + Tan[e + f*x]^2))/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e,
f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !GtQ[n, 0] &&  !LeQ[n, -
1]

Rubi steps

\begin {align*} \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{\sqrt {a+b \tan (c+d x)}} \, dx &=-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d}-\frac {\int \frac {\cot (c+d x) \left (\frac {1}{2} (A b-2 a B)+a A \tan (c+d x)+\frac {1}{2} A b \tan ^2(c+d x)\right )}{\sqrt {a+b \tan (c+d x)}} \, dx}{a}\\ &=-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d}-\frac {\int \frac {a A+a B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx}{a}-\frac {(A b-2 a B) \int \frac {\cot (c+d x) \left (1+\tan ^2(c+d x)\right )}{\sqrt {a+b \tan (c+d x)}} \, dx}{2 a}\\ &=-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d}-\frac {1}{2} (A-i B) \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx-\frac {1}{2} (A+i B) \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx-\frac {(A b-2 a B) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{2 a d}\\ &=-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d}+\frac {(i A-B) \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}-\frac {(i A+B) \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac {(A b-2 a B) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{a b d}\\ &=\frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d}+\frac {(A-i B) \operatorname {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {(A+i B) \operatorname {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{a^{3/2} d}+\frac {(i A+B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}-\frac {(i A-B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d}-\frac {A \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.85, size = 201, normalized size = 1.19 \[ \frac {\frac {b (A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{a^{3/2}}+\frac {\left (A \sqrt {-b^2}+b B\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {-b^2}}}\right )}{\sqrt {a-\sqrt {-b^2}}}-\frac {\left (A \sqrt {-b^2}-b B\right ) \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+\sqrt {-b^2}}}\right )}{\sqrt {a+\sqrt {-b^2}}}-\frac {A b \cot (c+d x) \sqrt {a+b \tan (c+d x)}}{a}}{b d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[c + d*x]^2*(A + B*Tan[c + d*x]))/Sqrt[a + b*Tan[c + d*x]],x]

[Out]

((b*(A*b - 2*a*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]])/a^(3/2) + ((A*Sqrt[-b^2] + b*B)*ArcTanh[Sqrt[a +
b*Tan[c + d*x]]/Sqrt[a - Sqrt[-b^2]]])/Sqrt[a - Sqrt[-b^2]] - ((A*Sqrt[-b^2] - b*B)*ArcTanh[Sqrt[a + b*Tan[c +
 d*x]]/Sqrt[a + Sqrt[-b^2]]])/Sqrt[a + Sqrt[-b^2]] - (A*b*Cot[c + d*x]*Sqrt[a + b*Tan[c + d*x]])/a)/(b*d)

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*p
i/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unab
le to check sign: (2*pi/x/2)>(-2*pi/x/2)Warning, need to choose a branch for the root of a polynomial with par
ameters. This might be wrong.The choice was done assuming [d]=[29,3]sym2poly/r2sym(const gen & e,const index_m
 & i,const vecteur & l) Error: Bad Argument ValueWarning, need to choose a branch for the root of a polynomial
 with parameters. This might be wrong.The choice was done assuming [d]=[-40,41]sym2poly/r2sym(const gen & e,co
nst index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const gen & e,const index_m & i,con
st vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Err
or: Bad Argument Valuesym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Va
luesym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(c
onst gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const gen & e,const
index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const gen & e,const index_m & i,const v
ecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error:
Bad Argument Valuesym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Values
ym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const
 gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(const gen & e,const inde
x_m & i,const vecteur & l) Error: Bad Argument ValueWarning, integration of abs or sign assumes constant sign
by intervals (correct if the argument is real):Check [abs(t_nostep^2-1)]Discontinuities at zeroes of t_nostep^
2-1 were not checkedEvaluation time: 85.12Done

________________________________________________________________________________________

maple [C]  time = 3.41, size = 69579, normalized size = 411.71 \[ \text {output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^2*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x)

[Out]

result too large to display

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \cot \left (d x + c\right )^{2}}{\sqrt {b \tan \left (d x + c\right ) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^2*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate((B*tan(d*x + c) + A)*cot(d*x + c)^2/sqrt(b*tan(d*x + c) + a), x)

________________________________________________________________________________________

mupad [B]  time = 8.68, size = 9790, normalized size = 57.93 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(1/2),x)

[Out]

atan(((((((8*(32*A*a*b^11*d^4 + 16*A*a^3*b^9*d^4 - 64*B*a^2*b^10*d^4 - 48*B*a^4*b^8*d^4))/(a^2*d^5) - (16*(32*
a^2*b^10*d^4 + 48*a^4*b^8*d^4)*(a + b*tan(c + d*x))^(1/2)*((((8*A^2*a*d^2 - 8*B^2*a*d^2 + 16*A*B*b*d^2)^2/4 -
(16*a^2*d^4 + 16*b^2*d^4)*(A^4 + 2*A^2*B^2 + B^4))^(1/2) - 4*A^2*a*d^2 + 4*B^2*a*d^2 - 8*A*B*b*d^2)/(16*(a^2*d
^4 + b^2*d^4)))^(1/2))/(a^2*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(((8*A^2*a*d^2 - 8*B^2*a*d^2 + 16*A*B*b*d^2)^2/4 - (16*a^2*d^4
+ 16*b^2*d^4)*(A^4 + 2*A^2*B^2 + B^4))^(1/2) + 4*A^2*a*d^2 - 4*B^2*a*d^2 + 8*A*B*b*d^2)/(16*(a^2*d^4 + b^2*d^4
)))^(1/2)*2i - (atan((((A*b - 2*B*a)*((16*(a + b*tan(c + d*x))^(1/2)*(A^2*B^2*b^10 - A^4*b^10 + 2*A^4*a^2*b^8
+ 6*B^4*a^2*b^8 - 4*A*B^3*a*b^9 + 4*A^3*B*a*b^9))/(a^2*d^4) - (((8*(4*A^3*b^11*d^2 + 16*A^3*a^2*b^9*d^2 + 12*B
^3*a^3*b^8*d^2 + 12*A^2*B*a*b^10*d^2 - 48*A*B^2*a^2*b^9*d^2 - 36*A^2*B*a^3*b^8*d^2))/(a^2*d^5) - ((A*b - 2*B*a
)*((16*(a + b*tan(c + d*x))^(1/2)*(20*A^2*a^3*b^8*d^2 - 36*B^2*a^3*b^8*d^2 - 4*A^2*a*b^10*d^2 + 48*A*B*a^2*b^9
*d^2))/(a^2*d^4) - (((8*(32*A*a*b^11*d^4 + 16*A*a^3*b^9*d^4 - 64*B*a^2*b^10*d^4 - 48*B*a^4*b^8*d^4))/(a^2*d^5)
 - (8*(A*b - 2*B*a)*(32*a^2*b^10*d^4 + 48*a^4*b^8*d^4)*(a + b*tan(c + d*x))^(1/2))/(a^2*d^5*(a^3)^(1/2)))*(A*b
 - 2*B*a))/(2*d*(a^3)^(1/2))))/(2*d*(a^3)^(1/2)))*(A*b - 2*B*a))/(2*d*(a^3)^(1/2)))*1i)/(2*d*(a^3)^(1/2)) + ((
A*b - 2*B*a)*((16*(a + b*tan(c + d*x))^(1/2)*(A^2*B^2*b^10 - A^4*b^10 + 2*A^4*a^2*b^8 + 6*B^4*a^2*b^8 - 4*A*B^
3*a*b^9 + 4*A^3*B*a*b^9))/(a^2*d^4) + (((8*(4*A^3*b^11*d^2 + 16*A^3*a^2*b^9*d^2 + 12*B^3*a^3*b^8*d^2 + 12*A^2*
B*a*b^10*d^2 - 48*A*B^2*a^2*b^9*d^2 - 36*A^2*B*a^3*b^8*d^2))/(a^2*d^5) + ((A*b - 2*B*a)*((16*(a + b*tan(c + d*
x))^(1/2)*(20*A^2*a^3*b^8*d^2 - 36*B^2*a^3*b^8*d^2 - 4*A^2*a*b^10*d^2 + 48*A*B*a^2*b^9*d^2))/(a^2*d^4) + (((8*
(32*A*a*b^11*d^4 + 16*A*a^3*b^9*d^4 - 64*B*a^2*b^10*d^4 - 48*B*a^4*b^8*d^4))/(a^2*d^5) + (8*(A*b - 2*B*a)*(32*
a^2*b^10*d^4 + 48*a^4*b^8*d^4)*(a + b*tan(c + d*x))^(1/2))/(a^2*d^5*(a^3)^(1/2)))*(A*b - 2*B*a))/(2*d*(a^3)^(1
/2))))/(2*d*(a^3)^(1/2)))*(A*b - 2*B*a))/(2*d*(a^3)^(1/2)))*1i)/(2*d*(a^3)^(1/2)))/((16*(A^4*B*b^10 + 2*A^5*a*
b^9 + A^2*B^3*b^10 - 4*A^2*B^3*a^2*b^8 - 2*A*B^4*a*b^9 - 4*A^4*B*a^2*b^8))/(a^2*d^5) - ((A*b - 2*B*a)*((16*(a
+ b*tan(c + d*x))^(1/2)*(A^2*B^2*b^10 - A^4*b^10 + 2*A^4*a^2*b^8 + 6*B^4*a^2*b^8 - 4*A*B^3*a*b^9 + 4*A^3*B*a*b
^9))/(a^2*d^4) - (((8*(4*A^3*b^11*d^2 + 16*A^3*a^2*b^9*d^2 + 12*B^3*a^3*b^8*d^2 + 12*A^2*B*a*b^10*d^2 - 48*A*B
^2*a^2*b^9*d^2 - 36*A^2*B*a^3*b^8*d^2))/(a^2*d^5) - ((A*b - 2*B*a)*((16*(a + b*tan(c + d*x))^(1/2)*(20*A^2*a^3
*b^8*d^2 - 36*B^2*a^3*b^8*d^2 - 4*A^2*a*b^10*d^2 + 48*A*B*a^2*b^9*d^2))/(a^2*d^4) - (((8*(32*A*a*b^11*d^4 + 16
*A*a^3*b^9*d^4 - 64*B*a^2*b^10*d^4 - 48*B*a^4*b^8*d^4))/(a^2*d^5) - (8*(A*b - 2*B*a)*(32*a^2*b^10*d^4 + 48*a^4
*b^8*d^4)*(a + b*tan(c + d*x))^(1/2))/(a^2*d^5*(a^3)^(1/2)))*(A*b - 2*B*a))/(2*d*(a^3)^(1/2))))/(2*d*(a^3)^(1/
2)))*(A*b - 2*B*a))/(2*d*(a^3)^(1/2))))/(2*d*(a^3)^(1/2)) + ((A*b - 2*B*a)*((16*(a + b*tan(c + d*x))^(1/2)*(A^
2*B^2*b^10 - A^4*b^10 + 2*A^4*a^2*b^8 + 6*B^4*a^2*b^8 - 4*A*B^3*a*b^9 + 4*A^3*B*a*b^9))/(a^2*d^4) + (((8*(4*A^
3*b^11*d^2 + 16*A^3*a^2*b^9*d^2 + 12*B^3*a^3*b^8*d^2 + 12*A^2*B*a*b^10*d^2 - 48*A*B^2*a^2*b^9*d^2 - 36*A^2*B*a
^3*b^8*d^2))/(a^2*d^5) + ((A*b - 2*B*a)*((16*(a + b*tan(c + d*x))^(1/2)*(20*A^2*a^3*b^8*d^2 - 36*B^2*a^3*b^8*d
^2 - 4*A^2*a*b^10*d^2 + 48*A*B*a^2*b^9*d^2))/(a^2*d^4) + (((8*(32*A*a*b^11*d^4 + 16*A*a^3*b^9*d^4 - 64*B*a^2*b
^10*d^4 - 48*B*a^4*b^8*d^4))/(a^2*d^5) + (8*(A*b - 2*B*a)*(32*a^2*b^10*d^4 + 48*a^4*b^8*d^4)*(a + b*tan(c + d*
x))^(1/2))/(a^2*d^5*(a^3)^(1/2)))*(A*b - 2*B*a))/(2*d*(a^3)^(1/2))))/(2*d*(a^3)^(1/2)))*(A*b - 2*B*a))/(2*d*(a
^3)^(1/2))))/(2*d*(a^3)^(1/2))))*(A*b - 2*B*a)*1i)/(d*(a^3)^(1/2)) + (A*b*(a + b*tan(c + d*x))^(1/2))/(a*(a*d
- d*(a + b*tan(c + d*x))))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \cot ^{2}{\left (c + d x \right )}}{\sqrt {a + b \tan {\left (c + d x \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**2*(A+B*tan(d*x+c))/(a+b*tan(d*x+c))**(1/2),x)

[Out]

Integral((A + B*tan(c + d*x))*cot(c + d*x)**2/sqrt(a + b*tan(c + d*x)), x)

________________________________________________________________________________________